package cn.itcast.service;

import cn.itcast.pojo.*;

import com.aliyuncs.exceptions.ClientException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface EmpService {


    //分页查询
    PageInfo findByCondition(QuaryParma quaryParma);

    //添加员工
    @Transactional
    boolean add(Emp emp);

    //根据id批量删除
    @Transactional(rollbackFor = Exception.class)
    boolean deleteById(int[] ids);

    //根据id查找
    Emp findById(Integer id);

    //修改员工信息
    @Transactional
    boolean update(Emp emp) throws ClientException;

    //查询全部员工
    List<Emp> findAll();

    //根据id批量查询员工
    List<Emp> findByIds(int[] ids);

    @Transactional(rollbackFor = Exception.class)
    //登录
    LoginVO login(Emp emp);

}
